package com.zy.excel.test2;


import javax.swing.filechooser.FileSystemView;
import java.io.File;
import java.util.List;

public class Test {

    public static void main(String[] args) throws Exception {

        //获取本机桌面地址
        File desktopDir = FileSystemView.getFileSystemView().getHomeDirectory();
        String desktopPath = desktopDir.getAbsolutePath();
        //读取文件的路径为桌面的  学生.xls  读取文件
        File file = new File(desktopPath+"/学生.xls");
        //得到表格中的信息
        List<List<String>> lists = ImportExcelUtil.importExcelUtil(file);
        //将其解析为bean类
        List<Student> list = beanConverter.listToStudentConverter(lists);

        //遍历
        for(Student student : list){
            System.out.println(student);
        }

    }

}
